<?php
namespace app\model\money;

use think\Model;

class SubtypeModel extends Model
{
    protected $name = 'money_subtype';
    protected $pk = 'id';

    public static function getEnglishById($id) {
        if ($id == "0") return "*";
        if ($id == "1") return "IN";
        else return "OUT"; 
    }

    public static function isExist($name) {
        if ($name != 'OUT' && $name != 'IN') return false;
        else return true;
    }
}